package com.zl.learning.guava;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;

public class TestEventBus {

    @Subscribe
    public void doAction(final String event){
        System.out.println(event);
    }

    @Subscribe
    public void doAction2(final String event){
        System.out.println(event);
    }

    public static void main(String[] args) {
        EventBus eventBus = new EventBus();
        eventBus.register(new TestEventBus());
        eventBus.post("HelloWorld");
    }
}
